﻿<Window x:Class="ResourceBlender_Express.WinAddResource"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender_Express"
    xmlns:validators="clr-namespace:ResourceBlender_Express.Validators"
    loc:WindowService.EscapeClosesWindow="True"
    Title="Add Resource" 
    MinHeight="310" MinWidth="380" Height="310" Width="400"
    SizeToContent="Height" WindowStartupLocation="CenterOwner"
    Style="{StaticResource {x:Type Window}}" Icon="/ResourceBlender-Express;component/Resources/images/resourceblender.ico">
    <Window.CommandBindings>
        <CommandBinding Command="loc:ResourceBlenderCommands.OpenFullEditor" Executed="ShowFullEditor" />
        <CommandBinding Command="loc:ResourceBlenderCommands.FindSimilar" Executed="FindSimilar" />
        <CommandBinding Command="loc:ResourceBlenderCommands.AutoTranslate" Executed="AutoTranslate" />
        <CommandBinding Command="ApplicationCommands.Save" Executed="Save" />
        <CommandBinding Command="ApplicationCommands.Close" Executed="CloseWindow" />
    </Window.CommandBindings>
    <Window.Resources>

    </Window.Resources>
    <DockPanel>
        <ToolBar x:Name="tlbMain" DockPanel.Dock="Top" VerticalAlignment="Top" HorizontalAlignment="Stretch" IsHitTestVisible="True" HorizontalContentAlignment="Left">
            <loc:ImageButton Command="ApplicationCommands.Save" IsDefault="True" Text="Save" ToolTip="Save and Close" ShowText="False" Image="Resources/images/save_24.png" Style="{StaticResource ToolBarButton}" />
        </ToolBar>
        <Grid x:Name="grdContainer" DockPanel.Dock="Top" Margin="6">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            
            <Label Grid.Row="0" Grid.Column="0" ToolTip="Comments about the resource. Eg: Where it's used">Resource Comment</Label>
            <TextBox Grid.Row="0" Grid.Column="1" x:Name="txtResourceComment" Text="{Binding Path=Comment,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
            <loc:ImageButton Grid.Row="0" Grid.Column="2" Image="Resources/images/expand_16.png" ShowText="False" ToolTip="Edit this field using the full editor" Margin="1,1,0,1"
                             Command="loc:ResourceBlenderCommands.OpenFullEditor" CommandTarget="{Binding ElementName=txtResourceComment}" />
            
            <ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalScrollBarVisibility="Auto" Height="350" MaxHeight="500" HorizontalContentAlignment="Stretch">
                <StackPanel x:Name="stkTranslations" HorizontalAlignment="Stretch" Margin="6">

                </StackPanel>
            </ScrollViewer>
        </Grid>
        <StatusBar DockPanel.Dock="Bottom" Height="24">
            <StatusBarItem x:Name="lblStatus" Visibility="Hidden">Loading</StatusBarItem>
            <ProgressBar x:Name="prgStatus" IsIndeterminate="True" Visibility="Hidden" />
        </StatusBar>
    </DockPanel>
</Window>
